3.1.41 \(\int \frac {a+b \log (c (d+e x)^n)}{(f+g x)^2} \, dx\) [41]

Optimal. Leaf size=74 \[ \frac {b e n \log (d+e x)}{g (e f-d g)}-\frac {a+b \log \left (c (d+e x)^n\right )}{g (f+g x)}-\frac {b e n \log (f+g x)}{g (e f-d g)} \]

[Out]

b*e*n*ln(e*x+d)/g/(-d*g+e*f)+(-a-b*ln(c*(e*x+d)^n))/g/(g*x+f)-b*e*n*ln(g*x+f)/g/(-d*g+e*f)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {2442, 36, 31} \begin {gather*} -\frac {a+b \log \left (c (d+e x)^n\right )}{g (f+g x)}+\frac {b e n \log (d+e x)}{g (e f-d g)}-\frac {b e n \log (f+g x)}{g (e f-d g)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*(d + e*x)^n])/(f + g*x)^2,x]

[Out]

(b*e*n*Log[d + e*x])/(g*(e*f - d*g)) - (a + b*Log[c*(d + e*x)^n])/(g*(f + g*x)) - (b*e*n*Log[f + g*x])/(g*(e*f
 - d*g))

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 2442

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[(f + g*
x)^(q + 1)*((a + b*Log[c*(d + e*x)^n])/(g*(q + 1))), x] - Dist[b*e*(n/(g*(q + 1))), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rubi steps

\begin {align*} \int \frac {a+b \log \left (c (d+e x)^n\right )}{(f+g x)^2} \, dx &=-\frac {a+b \log \left (c (d+e x)^n\right )}{g (f+g x)}+\frac {(b e n) \int \frac {1}{(d+e x) (f+g x)} \, dx}{g}\\ &=-\frac {a+b \log \left (c (d+e x)^n\right )}{g (f+g x)}-\frac {(b e n) \int \frac {1}{f+g x} \, dx}{e f-d g}+\frac {\left (b e^2 n\right ) \int \frac {1}{d+e x} \, dx}{g (e f-d g)}\\ &=\frac {b e n \log (d+e x)}{g (e f-d g)}-\frac {a+b \log \left (c (d+e x)^n\right )}{g (f+g x)}-\frac {b e n \log (f+g x)}{g (e f-d g)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.05, size = 57, normalized size = 0.77 \begin {gather*} \frac {-\frac {a+b \log \left (c (d+e x)^n\right )}{f+g x}+\frac {b e n (\log (d+e x)-\log (f+g x))}{e f-d g}}{g} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*(d + e*x)^n])/(f + g*x)^2,x]

[Out]

(-((a + b*Log[c*(d + e*x)^n])/(f + g*x)) + (b*e*n*(Log[d + e*x] - Log[f + g*x]))/(e*f - d*g))/g

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.38, size = 354, normalized size = 4.78

method result size
risch \(-\frac {b \ln \left (\left (e x +d \right )^{n}\right )}{g \left (g x +f \right )}-\frac {i \pi b e f \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3}-i \pi b e f \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}-i \pi b d g \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3}+i \pi b d g \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}-i \pi b d g \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )-i \pi b e f \,\mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}+i \pi b d g \,\mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}+i \pi b e f \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )-2 \ln \left (-g x -f \right ) b e g n x +2 \ln \left (e x +d \right ) b e g n x -2 \ln \left (-g x -f \right ) b e f n +2 \ln \left (e x +d \right ) b e f n +2 \ln \left (c \right ) b d g -2 \ln \left (c \right ) b e f +2 a d g -2 a e f}{2 \left (g x +f \right ) g \left (d g -e f \right )}\) \(354\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*(e*x+d)^n))/(g*x+f)^2,x,method=_RETURNVERBOSE)

[Out]

-b/g/(g*x+f)*ln((e*x+d)^n)-1/2*(I*Pi*b*e*f*csgn(I*c*(e*x+d)^n)^3-I*Pi*b*e*f*csgn(I*c)*csgn(I*c*(e*x+d)^n)^2-I*
Pi*b*d*g*csgn(I*c*(e*x+d)^n)^3+I*Pi*b*d*g*csgn(I*c)*csgn(I*c*(e*x+d)^n)^2-I*Pi*b*d*g*csgn(I*c)*csgn(I*(e*x+d)^
n)*csgn(I*c*(e*x+d)^n)-I*Pi*b*e*f*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)^2+I*Pi*b*d*g*csgn(I*(e*x+d)^n)*csgn(I*
c*(e*x+d)^n)^2+I*Pi*b*e*f*csgn(I*c)*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)-2*ln(-g*x-f)*b*e*g*n*x+2*ln(e*x+d)*b
*e*g*n*x-2*ln(-g*x-f)*b*e*f*n+2*ln(e*x+d)*b*e*f*n+2*ln(c)*b*d*g-2*ln(c)*b*e*f+2*a*d*g-2*a*e*f)/(g*x+f)/g/(d*g-
e*f)

________________________________________________________________________________________

Maxima [A]
time = 0.31, size = 90, normalized size = 1.22 \begin {gather*} b n {\left (\frac {\log \left (g x + f\right )}{d g^{2} - f g e} - \frac {\log \left (x e + d\right )}{d g^{2} - f g e}\right )} e - \frac {b \log \left ({\left (x e + d\right )}^{n} c\right )}{g^{2} x + f g} - \frac {a}{g^{2} x + f g} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))/(g*x+f)^2,x, algorithm="maxima")

[Out]

b*n*(log(g*x + f)/(d*g^2 - f*g*e) - log(x*e + d)/(d*g^2 - f*g*e))*e - b*log((x*e + d)^n*c)/(g^2*x + f*g) - a/(
g^2*x + f*g)

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 99, normalized size = 1.34 \begin {gather*} -\frac {a d g - a f e - {\left (b g n x + b f n\right )} e \log \left (g x + f\right ) + {\left (b g n x e + b d g n\right )} \log \left (x e + d\right ) + {\left (b d g - b f e\right )} \log \left (c\right )}{d g^{3} x + d f g^{2} - {\left (f g^{2} x + f^{2} g\right )} e} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))/(g*x+f)^2,x, algorithm="fricas")

[Out]

-(a*d*g - a*f*e - (b*g*n*x + b*f*n)*e*log(g*x + f) + (b*g*n*x*e + b*d*g*n)*log(x*e + d) + (b*d*g - b*f*e)*log(
c))/(d*g^3*x + d*f*g^2 - (f*g^2*x + f^2*g)*e)

________________________________________________________________________________________

Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: NotImplementedError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*(e*x+d)**n))/(g*x+f)**2,x)

[Out]

Exception raised: NotImplementedError >> no valid subset found

________________________________________________________________________________________

Giac [A]
time = 5.81, size = 111, normalized size = 1.50 \begin {gather*} \frac {b g n x e \log \left (g x + f\right ) - b g n x e \log \left (x e + d\right ) + b f n e \log \left (g x + f\right ) - b d g n \log \left (x e + d\right ) - b d g \log \left (c\right ) + b f e \log \left (c\right ) - a d g + a f e}{d g^{3} x - f g^{2} x e + d f g^{2} - f^{2} g e} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))/(g*x+f)^2,x, algorithm="giac")

[Out]

(b*g*n*x*e*log(g*x + f) - b*g*n*x*e*log(x*e + d) + b*f*n*e*log(g*x + f) - b*d*g*n*log(x*e + d) - b*d*g*log(c)
+ b*f*e*log(c) - a*d*g + a*f*e)/(d*g^3*x - f*g^2*x*e + d*f*g^2 - f^2*g*e)

________________________________________________________________________________________

Mupad [B]
time = 1.14, size = 84, normalized size = 1.14 \begin {gather*} -\frac {a}{x\,g^2+f\,g}-\frac {b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )}{g\,\left (f+g\,x\right )}+\frac {b\,e\,n\,\mathrm {atan}\left (\frac {e\,f\,2{}\mathrm {i}+e\,g\,x\,2{}\mathrm {i}}{d\,g-e\,f}+1{}\mathrm {i}\right )\,2{}\mathrm {i}}{g\,\left (d\,g-e\,f\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*log(c*(d + e*x)^n))/(f + g*x)^2,x)

[Out]

(b*e*n*atan((e*f*2i + e*g*x*2i)/(d*g - e*f) + 1i)*2i)/(g*(d*g - e*f)) - (b*log(c*(d + e*x)^n))/(g*(f + g*x)) -
 a/(f*g + g^2*x)

________________________________________________________________________________________